Google aims Dart at ‘the Visual Basic of the Web’
Google has released an early version of Dart, a new programming language designed to take some of the pain out of developing applications for the Web. But while it’s an evolutionary improvement on JavaScript, Dart faces a hard uphill battle for acceptance.
Dart is an object-oriented, structured programming language designed to ease some of the problems that developers run into writing large Web-based applications. It has a structure that will be familiar to most developers who have worked with JavaScript.
But Dart is more easily organized into smaller methods and objects than in scripting languages, so as to avoid monstrous monolithic blocks of code that are difficult to maintain. It’s also designed to be more self-documenting (in the tradition of Python). On Google’s Chromium and Code blogs, Google Dart team software engineer Lars Bak wrote,“Generally, the contracts with other parts of an application are conveyed in comments rather than in the language structure itself. As a result, it’s difficult for someone other than the author to read and maintain a particular piece of code.”
Dart also allows for the optional use of data types in variables and method calls. “This means you can start coding without types and add them later as needed,” Bak explained. “With existing languages, the developer is forced to make a choice between static and dynamic languages. Traditional static languages require heavyweight toolchains and a coding style that can feel inflexible and overly constrained.”
For Web client applications, Dart code be compiled to JavaScript code, so applications developed in Dart can run on nearly any current browser, as well as on mobile devices that support JavaScript. It also includes libraries based on the draft specification for the HTML 5 document object model, so it’s intended to be well-suited to rich front-end applications.